<?php
namespace app\backend\validate;

use think\Validate;

class Modules extends Validate
{

    protected $rule =   [
        'menu_name_cn'              => 'require|max:100',
        'menu_name_en'              => 'max:100',
        //'content_cn' => 'require',
        //'content_en' => 'require',

       /* 验证不能为空
       'title_cn'              => 'require|max:20',
        'title_en'              => 'require|max:20',
        'title_introduce_cn' => 'require|max:255',
        'title_introduce_en' => 'require|max:255',
        'content_cn' => 'require|max:255',
        'content_en' => 'require|max:255',*/
    ];

    protected $message  =   [
        'menu_name_cn.require'      => '标题格式不正确',


    ];

    protected $scene = [
        'add' => ['menu_name_cn','menu_name_en'],
        'edit' => ['menu_name_cn','menu_name_en']
    ];

}


